package com.wh.controller.stock;


import com.wh.service.stock.StockService;
import com.wh.vo.PageResult;
import com.wh.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/stock/")
public class StockController {

    @Autowired
    private StockService stockService;

    @GetMapping("list")
    public SysResult getStockList(PageResult pageResult){
        pageResult = stockService.getStockList(pageResult);
        return SysResult.success(pageResult);
    }
}
